package shili;

import org.aopalliance.intercept.Joinpoint;

import java.util.logging.Logger;

/**
 * UserServiceLogger
 *
 * @author boy
 * @since 2023/10/16
 */
@Aspect
public class UserServiceLogger {
    private static final Logger log=Logger.getLogger(String.valueOf(UserServiceLogger.class));
    @Before("execution(* service.UserService.*(..))")
    public void before(Joinpoint jp){
        log.info("调用"+jp.getTarget());
    }
    @AfterReturning(pointcut="execution(* service.UserService.*(..))",returning="returnValue")
    public void afterRetruning(Joinpoint jp,Object returnValue){
        log.info("调用"+jp.getTarget());
    }
}
